import java.util.Scanner;

public class Student {
    private String name;
    private int age;
    private String major;
    private String studentNo;

    public Student(String name,int age,String major,String studentNo) {
        this.name = name;
        this.age = age;
        this.major = major;
        this.studentNo = studentNo;
    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

    public String getMajor() {
        return major;
    }

    public String getStudentNo() {
        return studentNo;
    }
    //获取素数个数，为了方便封装到Student类中
    public int primeNo() {
        int i = 223;
        int j = 2;
        int k = 0;
        for (i = 223; i <= 323; i++) {
            for (j = 2; j < i; j++) {
                if(i % j == 0) {
                    break;
                }
            }
            if(j >= i){
                k++;
            }
        }
        return k;
    }
    //获取每一位素数，为了方便封装到Student类中
    public void primeOut() {
        int i = 223;
        int j = 2;
        int k = 0;
        for (i = 223; i <= 323; i++) {
            for (j = 2; j < i; j++) {
                if(i % j == 0) {
                    break;
                }
            }
            if(j >= i){
                System.out.print(" "+i);
            }
        }
    }
}
